package com.gzhryc.shared_device.oem.code.member.dao.db;

import com.gzhryc.common.NumberTools;
import com.gzhryc.jdbc.annotaion.Column;
import com.gzhryc.jdbc.annotaion.DateBranchTable;
import com.gzhryc.jdbc.annotaion.Id;
import com.gzhryc.jdbc.annotaion.Table;
import com.gzhryc.jdbc.enums.DateBranchTableType;
import com.gzhryc.shared_device.base.enums.WalletOperateEnum;

import java.io.Serializable;
import java.util.Date;

@DateBranchTable(type = DateBranchTableType.month)
@Table(name = "member_wallet_operate")
public class MemberWalletOperate implements Serializable {

	private static final long serialVersionUID = 1L;

	@Id
	protected Long id;

	@Column(name = "member_id",notNull = true)
	protected Long memberId;

	@Column(notNull = true,note = "操作的金额")
	protected Long money;

	@Column(name = "money_type", note = "操作金额的类型，余额，冻结余额，虚拟币")
	protected Integer moneyType;

	@Column(note = "操作类型，增加或减少")
	protected Integer type;
	
	@Column(name = "operator_type", note = "操作用户的类型")
	protected Integer operatorType;

	@Column(name = "operator_type_name", note = "操作用户的类型名称")
	protected String operatorTypeName;

	@Column(name = "operator", note = "操作用户")
	protected String operator;

	@Column(name = "operate_note",length = 255, note = "操作说明")
	protected String operateNote;

	@Column(name = "create_date", note = "操作时间")
	protected Date createDate;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Long getMemberId() {
		return memberId;
	}

	public void setMemberId(Long memberId) {
		this.memberId = memberId;
	}

	public Long getMoney() {
		return money;
	}

	public void setMoney(Long money) {
		this.money = money;
	}

	public Integer getMoneyType() {
		return moneyType;
	}

	public void setMoneyType(Integer moneyType) {
		this.moneyType = moneyType;
	}

	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	public Integer getOperatorType() {
		return operatorType;
	}

	public void setOperatorType(Integer operatorType) {
		this.operatorType = operatorType;
	}

	public String getOperatorTypeName() {
		return operatorTypeName;
	}

	public void setOperatorTypeName(String operatorTypeName) {
		this.operatorTypeName = operatorTypeName;
	}

	public String getOperator() {
		return operator;
	}

	public void setOperator(String operator) {
		this.operator = operator;
	}

	public String getOperateNote() {
		return operateNote;
	}

	public void setOperateNote(String operateNote) {
		this.operateNote = operateNote;
	}

	public Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	public String getTypeName(){
		return WalletOperateEnum.Type.note(this.type);
	}

	public String getMoneyTypeName(){
		return WalletOperateEnum.MoneyType.note(this.moneyType);
	}

	public String getMoneyStr(){
		return NumberTools.getMoneyLiStr(this.money);
	}
}
